home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / quickcom.arc / QUICKCOM.DOC < prev    next >
Text File  |  1989-06-09  |  21KB  |  1,189 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                              QUICKCOMM Version 1.0
  26.                                   June 9, 1989
  27.                          Copyright 1989 by David Cleary
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.          DISCLAIMER:
  72.  
  73.               This software is marketed as shareware and as such, is
  74.          only guaranteed to take up disk space. The author is not
  75.          responsible for any loss resulting in using this product. By
  76.          choosing to use this product, you assume all risks involved.
  77.  
  78.          DISTRIBUTION:
  79.  
  80.               I encourage distribution of this software in its
  81.          unmodified form as long as no fee is charge except a nominal
  82.          disk charge not to exceed $10.  I require that if you
  83.          distribute this package, that it be distributed in a self
  84.          extracting ZIP format.  I have done this because there is no
  85.          longer any standards left in the file archiving world. I
  86.          don't like getting some software and then find that I have to
  87.          get yet another unarcing utillity to use it. I have chosen
  88.          ZIP because it works well and I think PKWARE origanated the
  89.          self extracting type.
  90.  
  91.  
  92.          REGISTRATION:
  93.  
  94.               I ask that everyone who tries this software, likes it,
  95.          and plans on using it, to please register it. Registration is
  96.          FREE and will allow you to receive free telephone support. By
  97.          registering, you will also be notified about major updates
  98.          and new product announcements. Please take the time to fill
  99.          out the registration form at the end of this documentation.
  100.  
  101.  
  102.          LICENSE:
  103.  
  104.               Quickcomm's four part licensing agreement:
  105.  
  106.          1.   You are free to use this package for your own personal
  107.               use as you see fit. Read on about distributing programs.
  108.  
  109.          2.   If you use this package for a shareware or freeware
  110.               product, all I ask for is a full registered version of
  111.               the software and all rights I would receive as a
  112.               registered user. I have done this to help promote
  113.               shareware by providing these tools at no monetary cost
  114.               to shareware authors.
  115.  
  116.          3.   If you use this package for a commercial product, a fee
  117.               of $50 is required. This will entitle you to use this
  118.               product royalty free for all versions of a particular
  119.               product. A fee of $50 is required for each particular
  120.               product you use this package for.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.          4.   If you plan on using this package for software
  137.               distributed in house of a corporation, a fee of $50 is
  138.               required. This will allow your company all rights to use
  139.               this product in any and all software distributed in
  140.               house. Send a check or money order payable to David
  141.               Cleary to the address on the registration form.
  142.  
  143.  
  144.  
  145.          CONTACTING THE AUTHOR:
  146.  
  147.               I can be contacted a number of ways. The fastest way is
  148.          by sending in your free registration and receiving free
  149.          telephone support. The next fastest way is by sending me a
  150.          FIDO Netmail message to 1:141/730. I am also active in the
  151.          QUIK_BAS and ECPROG FIDO echoes. I can be contacted on
  152.          COMPUSERVE by sending mail to 76510,1725 or on PRODIGY by
  153.          sending mail to HSRW18A although I am not very active on
  154.          these services.  You can also send a letter to me at the
  155.          address on the registration form.
  156.  
  157.  
  158.  
  159.          ABOUT QUICKCOMM:
  160.  
  161.               I wrote QuickComm because of the problems I was having
  162.          with the com routines in QuickBASIC. I would get device
  163.          errors whenever there was line noise or just for no reason at
  164.          all. I also need to support baud rates higher than 9.6K. I
  165.          was able to work around these faults but after I wrote this,
  166.          my programs became much more reliable and easier to use.
  167.  
  168.               QuickComm is an interrupt driven communications library
  169.          for Microsoft QuickBASIC versions 4.0b and 4.5. It was
  170.          written and compiled with Microsoft C 5.1 with all calls to
  171.          routines in the C library rewritten in assembly. There is a
  172.          layer of QB code to ease the user interface. While this is
  173.          not the most efficient way of doing things, I felt it was
  174.          necessary to make this product easy to use. There may be an
  175.          advanced version in the future that doesn't contain this
  176.          interface.
  177.  
  178.               QuickComm may support QuickBASIC version 3.0 in the
  179.          future if there is demand for it. I know that version 3.0
  180.          does not do direct screen writes and also supports an
  181.          alternate math library, making programs execute faster.
  182.          Quickcom supports only Com1 and Com2 at this time. Support
  183.          for more com ports will be included in the future as I learn
  184.          more about the hardware involved. QuickComm will support a
  185.          baud rate up to 112K although the actual baud you achieve
  186.          will be limited to your hardware.
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.               Versions of QuickComm for Microsoft C/QuickC and
  202.          Microsoft ForTran 4.1 may be available in the future if there
  203.          is demand for it. There is no support planned for QuickPascal
  204.          at this time because it is not compatible with other
  205.          Microsoft languages and I don't have it. With the advent of
  206.          QuickAssembler, I hope to optimize even further the assembly
  207.          language generated by C 5.1 but this will take some time as I
  208.          improve my programming in assembly. I also plan to release a
  209.          toolbox for QuickComm that will be BASIC source for alot of
  210.          communication functions. Registered users will be the first
  211.          to know about the release.
  212.  
  213.               I have included source to two BASIC programs. The first
  214.          is called TREMINAL. It is the program that is distributed
  215.          with QuickBASIC. This program is what taught me how to use
  216.          the serial port. The other program is called TERMQKCM. It is
  217.          adapted to use the QuickComm library. I also suggest reading
  218.          "Programming in BASIC. Selected Topics." for those of you who
  219.          bought QB 4.0 and got the manuals. It explains thier TERMINAL
  220.          program pretty well.
  221.  
  222.               I know this documentation sucks. I am sorry but when it
  223.          started taking longer than the programming took, I had to
  224.          rush it. When I release the next version of QuickComm, I
  225.          promise that the documentation will be better. This is what
  226.          happens when you wait till the end to do the documentation.
  227.  
  228.  
  229.          A NOTE ABOUT CHAINING AND SHELLING:
  230.  
  231.               If you do door type programs and have to CHAIN or SHELL,
  232.          here is a simple rule of thumb to follow. If the program you
  233.          transfer control to does not need to access the com port, use
  234.          SHELL. The interupt routine will stay in memory and handle
  235.          all input while in the other program. If you need to transfer
  236.          control to a program that has to use the com port, use call
  237.          QComChain first and then use CHAIN or RUN. QComchain will
  238.          remove the interrupt routine but keep DTR hi so your modem
  239.          won't disconnect. Then if you are in another QB program, call
  240.          QComInit to put the interrupt routine back in memory.  If you
  241.          don't call QComChain or QComClose before your program
  242.          terminates or transfer control permenantly to another
  243.          program, YOUR MACHINE WILL LOCK UP. It will jump to a place
  244.          in memory that no longer has a valid routine and it will
  245.          crash.
  246.  
  247.               When you use QuickCom in the enviroment, you should save
  248.          your program before you run it. While I think I got it to
  249.          work pretty well in the enviroment, I am not guarenteeing
  250.          anything. If you loose cde because your machine locks up and
  251.          you didn't save your program, you have been warned.
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.          QComBuffOut
  268.  
  269.          Function
  270.  
  271.          QuickBASIC Equiv:  PRINT #1,
  272.  
  273.          Use: Ercd% = QComBuffOut("This is a string I want to print")
  274.  
  275.          Returns:   0     Worked properly.
  276.                    -2     Com Port not initialized.
  277.                    -4     Time out on Com Port handshake lines.
  278.                    -5     Transmit buffer not empty.
  279.                   #Bytes  Returns number of bytes it put into the
  280.                           transmit buffer. The only way for this to
  281.                           happen is by sending more than 2048 bytes at
  282.                           a time.
  283.  
  284.               I had problems with this routine if I sent things while
  285.          the buffer was still transmitting. It would stall and I don't
  286.          know why. To solve this, the transmit buffer must be empty.
  287.          This is so I can start the interrupts up in a reliable way. I
  288.          hope to have this routine improved by the next release.
  289.               This routine is very useful for file transfers. The size
  290.          of the buffer is 2048 bytes. Once it gets done dumping the
  291.          data into the buffer, you regain control while it is sending
  292.          the data. This will allow you to get the next block of data
  293.          from disk or other things you might have to do without
  294.          slowing down the transfer. This does not add a carriage
  295.          return/linefeed at the end. If you need that, you must add it
  296.          yourself.
  297.  
  298.  
  299.          EXAMPLE:
  300.  
  301.          OPEN "SENDTHIS.FIL" FOR BINARY AS #1 LEN=1024    'OPEN FILE
  302.                                                           'YOU WANT
  303.                                                           'TO SEND
  304.  
  305.          DO UNTIL EOF(1)
  306.               GET #1,,A$                            'GET 1K BLOCK
  307.               DO:LOOP UNTIL(QComXLoc = 0)           'WAIT FOR XMIT TO
  308.                                                     'EMPTY
  309.               IF (QComBuffOut(A$))                  'BUFFERED PRINT
  310.                  PRINT "ERROR TRANSMITTING FILE"
  311.                  END
  312.               END IF
  313.          LOOP
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.          QComChain
  334.  
  335.          Subroutine
  336.  
  337.          QuickBASIC Equiv:  None
  338.  
  339.          Use: Call QComChain  or  just QComChain
  340.  
  341.  
  342.               This routine is used to transfer control to another
  343.          program permanently without dropping DTR. This is used when
  344.          you use the QB commands CHAIN or RUN. It returns control over
  345.          to the BIOS for all com input and output. You should make
  346.          sure you don't have anything in the transmit or receive
  347.          buffers when you call this or you will lose it. I hope it
  348.          solves the problem people have with door programs and QB. I
  349.          have not had to do anything like this myself so I am not sure
  350.          exactly what people are trying to do. If this doesn't solve
  351.          that problem, let me know and I will try to solve it.
  352.               If you use the QB command SHELL to transfer control to
  353.          another program, the interrupt routine still resides in
  354.          memory and will function except the program you shelled to
  355.          will not have any access to it. You should only use SHELL if
  356.          you need to run a program that doesn't need to use the com
  357.          port. Use CHAIN or RUN for all other purposes.
  358.  
  359.  
  360.          EXAMPLE:
  361.  
  362.          QComChain                    'CLOSE COM PORT LEAVING DTR HI
  363.          CHAIN "NEXTPROG.EXE"         'PROGRAM TO TAKE CONTROL
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.          QComClose
  400.  
  401.          Subroutine
  402.  
  403.          QuickBASIC Equiv:  CLOSE #
  404.  
  405.          Use: Call QComClose  or just  QComClose
  406.  
  407.  
  408.               This routine is exactly the same as the QComChain
  409.          routine except that it drops DTR. You must make sure you
  410.          close the com port when your program terminates or you will
  411.          have problems with you machine locking up. It will expect an
  412.          area in memory to goto when there is input to the com port
  413.          and will overwrite what's ever in memory there.
  414.  
  415.  
  416.          EXAMPLE:
  417.  
  418.          QComClose           'CLOSE PORT AND RESET INT VECTOR
  419.          END
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.          QComDTR
  466.  
  467.          Function
  468.  
  469.          QuickBASIC Equiv:  None
  470.  
  471.          Use: ErCd% = QComDTR(Toggle)     Toggle = 0  DTR Dropped
  472.                                           Toggle = Not(0) DTR Raised
  473.  
  474.          Returns:     0     Worked Properly
  475.                      -2     Com Port not initialized
  476.  
  477.  
  478.               This routine lets you control the DTR line. Sending it a
  479.          0 raises it and anything else drops it.
  480.  
  481.  
  482.          EXAMPLE:
  483.  
  484.          IF (QComDTR(-1)) THEN PRINT "Com port not initialized"
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.          QComEOF
  532.  
  533.          Function
  534.  
  535.          QuickBASIC Equiv:  A = EOF(1)
  536.  
  537.          Use:  A = QComEOF
  538.  
  539.          Returns:     0     Data in receive buffer
  540.                      -1     Receive buffer empty
  541.  
  542.  
  543.               This routine emulates QuickBASIC's EOF function. It
  544.          returns a 0 if there is data in the buffer or a -1 if it is
  545.          empty.
  546.  
  547.  
  548.          EXAMPLE:
  549.  
  550.          IF NOT(QComEOF)     'CHECK FOR CHARACTERS IN RECEIVE BUFFER
  551.               ModemIn$ = QComInput$(ErrorCode)   'GET CHARACTERS
  552.               PRINT ModemIn$;                    'PRINT CHARACTERS
  553.          END IF
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.          QComFlush
  598.  
  599.          Subroutine
  600.  
  601.          QuickBASIC Equiv:  None
  602.  
  603.          Use:  CALL QComFlush
  604.  
  605.  
  606.               This routine flushes the transmit and receive buffers.
  607.          IMPORTANT... If you have a receive buffer overflow, you must
  608.          make a call to this routine. Otherwise your program will be
  609.          in limbo.
  610.  
  611.  
  612.          EXAMPLE:
  613.  
  614.          CALL QComFlush
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.          QComInit
  664.  
  665.          Function
  666.  
  667.          QuickBASIC Equiv:  OPEN "COM1:"
  668.  
  669.          Use:  ErCd% = QComInit(Parameters$)
  670.  
  671.          Returns:     0     Worked properly
  672.                      -1     Syntax error in Parameter$
  673.  
  674.  
  675.               This is the heart of the package. This installs the
  676.          interrupt routine and sets up all the parameters. Parameters$
  677.          has the following syntax:
  678.  
  679.          Port,Baud,Parity,Databits,Stopbits,Handshaking
  680.  
  681.          Port:     COM1:
  682.                    COM2:
  683.  
  684.          Baud:     110      4800
  685.                    150      9600
  686.                    300      19200
  687.                    600      38400
  688.                    1200     57600
  689.                    2400     115200
  690.  
  691.          Parity:   N
  692.                    E
  693.                    O
  694.  
  695.          Databits:  5
  696.                     6
  697.                     7
  698.                     8
  699.  
  700.          Stopbits:  1
  701.                     2
  702.  
  703.          Handshake:  CTS
  704.                      NONE
  705.  
  706.               You select the parameters you want and separate them by
  707.          commas and put them into a string. You can call this routine
  708.          as many times as you want in order to change a parameter. You
  709.          must include all of them. QuickComm supports COM1 or COM2.
  710.          You can not switch com ports unless you call QComClose to
  711.          close the port first. Quickcom supports baud rates from 110
  712.          to 115200. It supports CTS handshaking. If the receive buffer
  713.          gets near full, RTS is dropped until the buffer is emptied.
  714.          Of course the other computer must stop sending when RTS is
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.          dropped or you could still overrun the buffer.
  730.  
  731.  
  732.          EXAMPLE:
  733.  
  734.          If you wanted to open COM1 at 2400 baud with 8 databits, 1
  735.          stopbit, no parity and CTS handshaking it would be:
  736.  
  737.          ErCd% = QComInit("COM1:,2400,N,8,1,CTS")
  738.  
  739.          Remember to put a comma between the COM1 and 2400.
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.          QComInput$
  796.  
  797.          Function
  798.  
  799.          QuickBASIC Equiv:  INPUT$()
  800.  
  801.          Use:  ModemIn$ = QComInput$(ErCd%)
  802.  
  803.          Returns:     String from recieve buffer.
  804.  
  805.          Errorcodes:     0     Worked properly
  806.                         -2     Com port not initialized
  807.                         -3     Receive buffer overflow
  808.                         -5     No characters in buffer
  809.  
  810.  
  811.               This routine gets a string from the receive buffer.
  812.          IMPORTANT... If you get a receive buffer overflow error, you
  813.          must execute a QComFlush to have your program continue to
  814.          function properly.
  815.  
  816.  
  817.          EXAMPLE:
  818.  
  819.          ModemIn$ = QComInput$(ErCd%)
  820.          IF ErCd% = -3 THEN CALL QComFlush
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.          QComOut
  862.  
  863.          Function
  864.  
  865.          QuickBASIC Equiv:  PRINT #
  866.  
  867.          Use:  ErCd% = QComOut("This is what I want to send.")
  868.  
  869.          Returns:     0     Worked properly.
  870.                      -2     Com Port not initialized.
  871.                      -4     Time out.
  872.  
  873.               This routine outputs a string to the com port with out
  874.          buffering. It will output characters and when it is
  875.          completed, will return control back to your program. This is
  876.          what you should use unless you are sending a large amount of
  877.          data.  This routine does not add carraige returns or
  878.          linefeeds so you have to add them to your string yourself if
  879.          you want them.
  880.  
  881.  
  882.          EXAMPLE:
  883.  
  884.          KeyInput$=INKEY$
  885.          IF KeyInput$<>"" THEN
  886.               ErCd% = QComOut(KeyInput$)
  887.               IF ErCd% THEN PRINT"ERROR TRYING TO OUTPUT TO COM PORT
  888.          END IF
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.          QComRLoc
  928.  
  929.          Function
  930.  
  931.          QuickBASIC Equiv:  A% = LOC(1)
  932.  
  933.          Use:  Bytes% = QComRLoc
  934.  
  935.          Returns:     0     Receive buffer empty.
  936.                      >0     Number of bytes in receive buffer.
  937.  
  938.  
  939.               This function returns the number of characters in the
  940.          receive buffer. It ruturns 0 if the buffer is empty.
  941.  
  942.  
  943.          EXAMPLE:
  944.  
  945.          See Use.
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.          QComRTS
  994.  
  995.          Function
  996.  
  997.          QuickBASIC Equiv:  None
  998.  
  999.          Use:  ErCd% = QComRTS(Toggle%)     Toggle = 0  RTS Dropped
  1000.                                             Toggle = Not(0) RTS Raised
  1001.  
  1002.          Returns:     0     Worked Properly .
  1003.                      -2     Com Port not initialized.
  1004.  
  1005.  
  1006.               This routine is similar to QComDTR except it works on
  1007.          the RTS line. You drop this line if you want the other guy to
  1008.          stop sending you stuff. If you select CTS handshaking when
  1009.          you call QComInit, DTR is automatically dropped when the
  1010.          buffer gets near full and is raised when it gets near empty.
  1011.  
  1012.  
  1013.          EXAMPLE:
  1014.  
  1015.          IF (QComDTR(-1)) THEN PRINT "Com port not initialized."
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.          QComXLoc
  1060.  
  1061.          Function
  1062.  
  1063.          QuickBASIC Equiv:  None
  1064.  
  1065.          Use:  Bytes% = QComXLoc
  1066.  
  1067.          Returns:     0     Transmit buffer empty.
  1068.                      >0     Number of bytes in transmit buffer.
  1069.  
  1070.  
  1071.          This routine is similar to QComRLoc except it checks the
  1072.          transmit buffer. It will always return 0 unless you use
  1073.          QComBuffOut.
  1074.  
  1075.  
  1076.          EXAMPLE:
  1077.  
  1078.          See Use.
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.          Please mail this registration if you plan on using this
  1126.          program.
  1127.  
  1128.          Mail to:
  1129.  
  1130.               DAVID CLEARY
  1131.               LAKEVIEW TERRACE EXT.
  1132.               SANDY HOOK, CT 06482
  1133.  
  1134.  
  1135.  
  1136.  
  1137.          NAME:___________________________________________________
  1138.  
  1139.  
  1140.          ADDRESS:________________________________________________
  1141.  
  1142.  
  1143.          CITY,STATE ZIP:_________________________________________
  1144.  
  1145.  
  1146.  
  1147.          ANY COMMENTS,SUGGESTIONS,BUGS:__________________________
  1148.  
  1149.  
  1150.          ________________________________________________________
  1151.  
  1152.  
  1153.          ________________________________________________________
  1154.  
  1155.  
  1156.          ________________________________________________________
  1157.  
  1158.  
  1159.          ________________________________________________________
  1160.  
  1161.  
  1162.          ________________________________________________________
  1163.  
  1164.  
  1165.          ________________________________________________________
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.